Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

466
Views
Build failure run "mvn clean install". I just upgraded Big Sur

mvn clean install building failure

  [INFO] Total time:  1.911 s
    [INFO] Finished at: 2020-11-14T19:07:37+08:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project es-starter: Compilation failure
    [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
    [ERROR]
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Java & Maven environment

➜

      ~ which java
    /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
    ➜  ~ mvn -v
    Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-05T03:00:29+08:00)
    Maven home: /Users/munan/Documents/work/develop/maven/apache-maven-3.6.1
    Java version: 1.8.0_192, vendor: Oracle Corporation, runtime: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
    Default locale: zh_CN, platform encoding: UTF-8
    OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"

It seems that there is no problem with the environment. So where is the problem that caused the build to fail?

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

BigSur added JRE path for some reason and I uninstalled the JRE as I needed the JDK (and not JRE) and it worked.

  1. Go to /Library/Internet Plug-Ins.
  2. Remove the JavaAppletPlugin.plugin directory by executing the rm command as a root user or by using the sudo tool.
  3. Go to /Library/PreferencePanes.
  4. Remove JavaControlPanel.prefpane by executing the rm command as a root user or by using the sudo tool.
over 4 years ago · Santiago Trujillo Report

0

I was facing the same issue after updating my Mac to Big Sur!

BigSur added JRE path for some reason, and higher priority than yourself JDK。

Heres my solution:

First:

/usr/libexec/java_home -V

then maybe you will get:

Matching Java Virtual Machines (2):
    1.8.202.08 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
    1.8.0_202 (x86_64) "Oracle Corporation" - "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home

so the second is our's real JDK. Just edit the JAVA_HOME in your bash profile.

vim ~/.zshrc
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home"
source vim ~/.zshrc
echo $JAVA_HOME

Then it will works! enjoy Bug Sur!

Or you can reinstall jdk8 by this cmd:

brew tap adoptopenjdk/openjdk
brew cask install adoptopenjdk8
over 4 years ago · Santiago Trujillo Report

0

I was facing the same issue after updating my Mac to Big Sur! So I set my JAVA_HOME env variable and now everything is back to its business. Open the terminal and hit the below commands to solve it yourself.


$ vim .bash_profile 
export JAVA_HOME=$(/usr/libexec/java_home)
$ source .bash_profile
$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home

Check your java_home by running:

/usr/libexec/java_home -V

Read more about it here - https://mkyong.com/java/how-to-set-java_home-environment-variable-on-mac-os-x/

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!